
package se.sll.service.catalogue.gui.api.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Generated;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import org.codehaus.jackson.annotate.JsonAnyGetter;
import org.codehaus.jackson.annotate.JsonAnySetter;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonProperty;
import org.codehaus.jackson.annotate.JsonPropertyOrder;
import org.codehaus.jackson.map.annotate.JsonSerialize;


/**
 * A single product
 * 
 */
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
@Generated("org.jsonschema2pojo")
@JsonPropertyOrder({
    "unitId",
    "regionalUnitId",
    "relativeDistinguishedName",
    "creationTime",
    "updateTime",
    "productReferences"
})
public class Unit {

    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("unitId")
    @NotNull
    private String unitId;
    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("regionalUnitId")
    @NotNull
    private String regionalUnitId;
    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("relativeDistinguishedName")
    @NotNull
    private String relativeDistinguishedName;
    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("creationTime")
    @NotNull
    private Date creationTime;
    /**
     * 
     * (Required)
     * 
     */
    @JsonProperty("updateTime")
    @NotNull
    private Date updateTime;
    /**
     * a collection of Product Refefences
     * 
     */
    @JsonProperty("productReferences")
    @Valid
    private List<ProductReference> productReferences = new ArrayList<ProductReference>();
    @JsonIgnore
    private Map<String, Object> additionalProperties = new HashMap<String, Object>();

    /**
     * 
     * (Required)
     * 
     * @return
     *     The unitId
     */
    @JsonProperty("unitId")
    public String getUnitId() {
        return unitId;
    }

    /**
     * 
     * (Required)
     * 
     * @param unitId
     *     The unitId
     */
    @JsonProperty("unitId")
    public void setUnitId(String unitId) {
        this.unitId = unitId;
    }

    public Unit withUnitId(String unitId) {
        this.unitId = unitId;
        return this;
    }

    /**
     * 
     * (Required)
     * 
     * @return
     *     The regionalUnitId
     */
    @JsonProperty("regionalUnitId")
    public String getRegionalUnitId() {
        return regionalUnitId;
    }

    /**
     * 
     * (Required)
     * 
     * @param regionalUnitId
     *     The regionalUnitId
     */
    @JsonProperty("regionalUnitId")
    public void setRegionalUnitId(String regionalUnitId) {
        this.regionalUnitId = regionalUnitId;
    }

    public Unit withRegionalUnitId(String regionalUnitId) {
        this.regionalUnitId = regionalUnitId;
        return this;
    }

    /**
     * 
     * (Required)
     * 
     * @return
     *     The relativeDistinguishedName
     */
    @JsonProperty("relativeDistinguishedName")
    public String getRelativeDistinguishedName() {
        return relativeDistinguishedName;
    }

    /**
     * 
     * (Required)
     * 
     * @param relativeDistinguishedName
     *     The relativeDistinguishedName
     */
    @JsonProperty("relativeDistinguishedName")
    public void setRelativeDistinguishedName(String relativeDistinguishedName) {
        this.relativeDistinguishedName = relativeDistinguishedName;
    }

    public Unit withRelativeDistinguishedName(String relativeDistinguishedName) {
        this.relativeDistinguishedName = relativeDistinguishedName;
        return this;
    }

    /**
     * 
     * (Required)
     * 
     * @return
     *     The creationTime
     */
    @JsonProperty("creationTime")
    public Date getCreationTime() {
        return creationTime;
    }

    /**
     * 
     * (Required)
     * 
     * @param creationTime
     *     The creationTime
     */
    @JsonProperty("creationTime")
    public void setCreationTime(Date creationTime) {
        this.creationTime = creationTime;
    }

    public Unit withCreationTime(Date creationTime) {
        this.creationTime = creationTime;
        return this;
    }

    /**
     * 
     * (Required)
     * 
     * @return
     *     The updateTime
     */
    @JsonProperty("updateTime")
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 
     * (Required)
     * 
     * @param updateTime
     *     The updateTime
     */
    @JsonProperty("updateTime")
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Unit withUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }

    /**
     * a collection of Product Refefences
     * 
     * @return
     *     The productReferences
     */
    @JsonProperty("productReferences")
    public List<ProductReference> getProductReferences() {
        return productReferences;
    }

    /**
     * a collection of Product Refefences
     * 
     * @param productReferences
     *     The productReferences
     */
    @JsonProperty("productReferences")
    public void setProductReferences(List<ProductReference> productReferences) {
        this.productReferences = productReferences;
    }

    public Unit withProductReferences(List<ProductReference> productReferences) {
        this.productReferences = productReferences;
        return this;
    }

    @JsonAnyGetter
    public Map<String, Object> getAdditionalProperties() {
        return this.additionalProperties;
    }

    @JsonAnySetter
    public void setAdditionalProperty(String name, Object value) {
        this.additionalProperties.put(name, value);
    }

    public Unit withAdditionalProperty(String name, Object value) {
        this.additionalProperties.put(name, value);
        return this;
    }

}
